using Microsoft.AspNetCore.Mvc;

namespace MyAPI.Controllers;
[ApiController]
[Route("[controller]")]
public class IndexController : ControllerBase
{
     private readonly ILogger<IndexController> _logger;

     public IndexController(ILogger<IndexController> logger){
         this._logger = logger;
     }

     //get方法
     [HttpGet(Name = "GetIndex")]
     public String Get(){
         return "Hello World";
     }
}